package com.air.designmodel.four.decorator;

import com.air.designmodel.four.Beverage;
import com.air.designmodel.four.CondimentDecorator;

/**
 * 奶泡
 *
 * @author shent
 */
public class Whip extends CondimentDecorator {
    Beverage beverage;

    public Whip(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + ",Whip";
    }

    @Override
    public double cost() {
        return 0.10 + beverage.cost();
    }
}
